﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaiDouCommon.Model;

namespace TaiDouPhotonServer.DB.Manager
{
    //服务器属性管理类
    public class ServerPropertyManager
    {
        /// <summary>
        /// 查询服务器列表
        /// </summary>
        /// <returns></returns>
        public List<ServerProperty> GetServerList()
        {
            using (var session = NHiberateHelper.OpenSession())
            {
                using (var transaction = session.BeginTransaction())
                {
                    var list = session.QueryOver<ServerProperty>();
                    transaction.Commit();
                    return (List<ServerProperty>) list.List<ServerProperty>();
                }
            }
        }

    }
}
